package com.smart.model.convert;

import com.smart.model.dtomapper.ProjectReportDtoMapper;
import com.smart.model.domain.ProjectReportDO;
import com.smart.model.vo.ProjectReportVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class ProjectReportConvert {

    public static List<ProjectReportVO> buildProjectReportVoList(List<ProjectReportDO> projectReportDOList) {
        if (CollectionUtils.isEmpty(projectReportDOList)) {
            return Lists.newArrayList();
        }
        List<ProjectReportVO> projectReportVOList = new ArrayList<>();
        for (ProjectReportDO projectReportDO : projectReportDOList) {
            projectReportVOList.add(ProjectReportDtoMapper.INSTANCE.do2VO(projectReportDO));
        }

        return projectReportVOList;
    }
}
